﻿namespace ch11.interpreter
{
    public static partial class Instr
    {
        private static void Drop( Vm vm, object args)
        {
            vm.OperandStack.PopU64();
        }

        private static void Select( Vm vm, object args)
        {
            var v3 = vm.OperandStack.PopBool();
            var v2 = vm.OperandStack.PopU64();
            var v1 = vm.OperandStack.PopU64();

            vm.OperandStack.PushU64(v3 ? v1 : v2);
        }
    }
}